﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SetMemberXX.aspx.cs" Inherits="Manageweb_Member_SetMemberXX" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

    <script language="javascript" type="text/javascript">
        function CheckAll() {
            var chks = document.getElementsByName("chksingle");
            for (var i = 0; i < chks.length; i++) {
                if ((chks[i].type == "checkbox")) {
                    chks[i].checked = !chks[i].checked;
                }

            }
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%">
            <tr>
                <td colspan="2">
                    <fieldset>
                        <legend>会员信息</legend>
                        <div>
                            <table>
                                <tr>
                                    <td>
                                        会员账号:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblMemberAccount" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        会员名称:
                                    </td>
                                    <td>
                                        <asp:Label ID="lblMemberName" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td style="vertical-align: top; width: 50%">
                    <fieldset>
                        <legend>已分配下线 </legend>
                        <div>
                            <asp:GridView ID="GVAssingnXX" runat="server" AutoGenerateColumns="False" 
                                Width="100%" EmptyDataText="还未分配下线">
                                <Columns>
                                    <asp:BoundField DataField="IID" HeaderText="编号" />
                                    <asp:BoundField DataField="userid" HeaderText="账号" />
                                    <asp:BoundField DataField="username" HeaderText="用户名" />
                                    <asp:BoundField DataField="usermobile" HeaderText="手机" />
                                    <asp:BoundField DataField="useremail" HeaderText="邮箱" />
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            操作
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:LinkButton ID="lbtnDel" runat="server" OnCommand="lbtnDel_Command" CommandArgument='<%#Eval("userid") %>'>删除</asp:LinkButton>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                                  <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            </asp:GridView>
                        </div>
                    </fieldset>
                </td>
                <td style="vertical-align: top; width: 50%">
                    <fieldset>
                        <legend>未分配会员 </legend>
                        <div>
                            <asp:GridView ID="GVUnassignXX" runat="server" AutoGenerateColumns="False" 
                                Width="100%" EmptyDataText="没有要分配上线的会员">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <input id="Checkbox1" onclick="CheckAll()" type="checkbox" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <input id="chksingles"   name="chksingle" value='<%#Eval("userid") %>' type="checkbox" />
                                        </ItemTemplate>
                                        <HeaderStyle HorizontalAlign="Center" />
                                        <ItemStyle HorizontalAlign="Center" />
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="IID" HeaderText="编号" />
                                    <asp:BoundField DataField="userid" HeaderText="账号" />
                                    <asp:BoundField DataField="username" HeaderText="用户名" />
                                    <asp:BoundField DataField="usermobile" HeaderText="手机" />
                                    <asp:BoundField DataField="useremail" HeaderText="邮箱" />
                                </Columns>
                                  <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                            </asp:GridView>
                        </div>
                        <div style="padding-left: 20px; padding-top: 10px;">
                            <asp:Button ID="btnAdd" runat="server" Text="添加下线" OnClick="btnAdd_Click" />
                        </div>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="lblMsg" runat="server"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
